
<div class="col-md-12">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-star text-primary"></i></span>
            <span class="panel-title">交易流水</span>
        </div>
        <div class="panel-body overflow"
        <% if(items.length <= 0){ %>
            style="padding-bottom: 240px" 
        <% } %>>
        
            <div class="col-md-2 pt5 pl20">
                <select id="searchType" name="searchType" class="m5" data-field="type">
                    <option value="0" <%= searched.price == 0 ? 'selected' : '' %>>所有</option>
                    <option value="1" <%= searched.price == 1 ? 'selected' : '' %>>收入</option>
                    <option value="-1" <%= searched.price == -1 ? 'selected' : '' %>>支出</option>
                </select>
                <i class="arrow double"></i>
                </label>
            </div>
            <div class="col-md-3">
                <select id="searchTitle" name="searchTitle" class="m5" data-field="title" multiple>
                    <!--<option value="-1" <%= searched.title == -1 ? 'selected' : '' %>>所有</option>-->
                    <% _.each(TRANSACTION_TITLE, function(key,value){ %>
                    <option value='<%=key%>' <%= searched.title == key ? 'selected': ''%>><%= value%></option>
                    <%})%>
                </select>
                <i class="arrow double"></i>
                </label>
            </div>
            <div class="col-md-5">
                    <div class="col-md-9">
                        <input type="text" id="dateFilter" name="dateFilter" class="form-control text-center mn" value="">
                    </div>
                    <div class="col-md-3">
                        <input type="button" id="search" class="btn btn-primary form-control mn" value="提交">
                    </div>
            </div>

            <% if(items.length > 0){ %>
            <div class="mt50">
                <table class="table table-striped fs13 mt20" id="account-transaction-list">
                    <thead>
                        <tr class="bg-light">
                            <th class="sortable" data-field="created_at">时间</th>
                            <th>种类</th>
                            <th>交易类型</th>
                            <th class="sortable" data-field="price">金额</th>
                            <th>状态</th>
                            <th>用户余额</th>
                            <th>订单编号</th>
                            <th>充值编号</th>
                        </tr>
                    </thead>
                    <tbody class="admin-form">
                        <% _.each(items, function(item){ %>
                            <tr data-id="<%= item.id %>" >
                                <td><%= item.created_at %></td>
                                <% if(item.price>0){%>
                                <td>收入</td>
                                <%}else{ %>
                                <td>支出</td>
                                <%}%>
                                <td><%= item.title %></td>
                                <% if(item.coupon){%>
                                <td><%= item.price %> (红包-<%= item.coupon %>)</td>
                                <%}else{ %>
                                <td><%= item.price %></td>
                                <%}%>
                                <td><%= TRANSACTION_STATUS[item.status] %></td>
                                <td><%= parseFloat(item.balance || 0).toFixed(2) %></td>
                                <% if(item.order_id){
                                if("参与牛牛" == item.title){%>
                                <td><a href="#op/game_order/?game=bull&id=<%= item.order_id %>"><%= item.order_id %></a></td>
                                <%}else if("参与水果机" == item.title){%>
                                <td><a href="#op/game_order/?game=fruit&id=<%= item.order_id %>"><%= item.order_id %></a></td>
                                <%}else{%>
                                <td><a href="#op/order/?order_id=<%= item.order_id %>&activity_type=<%= item.activity_type%>"><%= item.order_id %></a></td>
                                <%}} else {%>
                                <td>-</td>
                                <% } %>
                                <td><%= item.pay_id || '-' %></td>
                            </tr>
                        <% }) %>
                    </tbody>
                </table>
            </div>
        </div>
        <div><div class="pull-left" id="page-tips"></div><div id="trans-paginator"></div></div>
        <%}else{%>
            <div class="mt50">
            <h4 class="text-muted">无数据...</h4>
            </div>
        <%}%>
    </div>
</div>